<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">  <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <link href="__STATIC__/layout/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
     <link rel="stylesheet" type="text/css" href="__STATIC__/layout/css/plugins/webuploader/webuploader.css">
    <link rel="stylesheet" type="text/css" href="__STATIC__/layout/css/demo/webuploader-demo.css">
    <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
    .fujian{
      width:auto;
      margin:10px;
      border:1px solid #333;
      cursor:pointer;
      float:left;
    }
    </style>
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">补发票申请-查看 </h2>
    </div>
    <!-- 标题 -->
   <form id="f1">
   <input type="hidden" name="state" id="state"/>
   <input type="hidden" name="pfid" value="{$main.id}"/>
     <table class="table table-bordered text-center bud_hei" style="margin-bottom: 0">
       
        <tr>
            <td style="min-width: 120px;width: 120px">申请人</td>
            <td class="text-left">{$main.em_name}</td>
            <td style="min-width: 120px;width: 120px">所属部门/职位</td>
            <td class="text-left" style="min-width: 200px;width: 200px">{$main.de_name}/{$main.job_name}</td>
            <td style="min-width: 120px;width: 120px">提交时间</td>
            <td class="text-left" style="min-width: 200px;width: 200px">{$main.ctime}</td>
            
        </tr>
         <tr>
            <td style="min-width: 120px;width: 120px">流程编号</td>
            <td class="text-left" >{$main.no}</td>
            <td style="min-width: 120px;width: 120px">供应商名称</td>
           
            <td class="text-left" colspan="3">{$main.gys_name}</td>
        </tr>
        <tr>
          <td colspan="6" class="text-left" style="color:red;">温馨提示：请在发票粘帖联上注明此申请单号:{$main.no}<a>点此查看图列</a>,如邮寄地址未显示，请联系相关人员进行邮寄地址添加</td>
        </tr>
    </table>
      <table class="table table-striped table-bordered text-center bud_hei">
        <tr class="info text-center">
            <th class="text-center" rowspan="2">序号</th>
           <th class="text-center" rowspan="2">明细编号</th>
            <th class="text-center" rowspan="2">核销明细编号</th>
            <th class="text-center" rowspan="2">原活动明细编号</th>
            <th class="text-center" rowspan="2">核销申请人</th>
            <th class="text-center" rowspan="2">供应商</th>
            <th class="text-center" rowspan="2">三级费用科目</th>
            <th class="text-center" rowspan="2">是否增值税</th>
            <th class="text-center" rowspan="2">税率</th>
              <th class="text-center" colspan="3">支付信息</th>
               <th class="text-center" rowspan="2">发票号</th>
          </tr>
          <tr class="info text-center">
               <th class="text-center" >未税金额</th>
            <th class="text-center" >税金</th>
            <th class="text-center" >含税金额</th>
           </tr>
           {if $main.type==0}
        {volist name="apply" id="vo"}
            <tr class="neirong">
                <td>{$i}</td>
                <td>{$vo.no}_{$vo.detail_no}</td>
                <td><a onclick="hede({$vo.heid},{$vo.apid})">{$vo.hexiao_no}_{$vo.hexiao_detail_no}</a></td>
              <td><a onclick="xiangqing({$vo.apid})">{$vo.apply_no}_{$vo.apply_detail_no}</a><a href="{:url('Apapply/mingxijuece')}?did={$vo.apdid}" title="决策依据" class="J_menuItem" ><span style="display: none;">决策依据</span><span class="glyphicon glyphicon-zoom-in fangda" aria-hidden="true" style="display: inline-block;"></span></a></td>
              <td>{$vo.em_name}</td><td>{$vo.gys_name}</td><td>{$vo.kemu}</td>
               <td>{if $vo.dikou==1}是{else/}否{/if}</td>
              <td><span class="num2 ObjectNum">{$vo.hexiao_shuilv}</span>%</td>
              <td class="num2 ObjectNum">{$vo.zfjine}</td> <td class="num2 ObjectNum">{$vo.shuijin}</td><td class="num2 ObjectNum">{$vo.hanshui}</td>
              <td>{$vo.fp_no}</td>
            </tr>
        {/volist}
            {/if}
        <tr>
            <td colspan="2" >备注：</td>
            <td colspan="11" class="text-left">
               {$main.remark}
            </td>
          </tr>
        </table>
        <table class="table table-bordered text-left bud_hei">
            <tr class="info">
                <th class="text-left font-bold">审批意见</th>
            </tr>
            {volist name="logs" id="l"}
          <tr>
              <td>{$l.USERNAME} 审批动作：{$l.MEMO}；审批意见：{if $l.COMMENTS}{$l.COMMENTS}{else/}无{/if}(审批时间：{$l.ACTIONTIME})</td>
          </tr>
          
          {/volist}
      </table>
       {if $fujian}
       附件:
          <div>
            {volist name="fujian" id="fu"}
              <div class="fujian" onclick="down({$fu.id})">{$fu.file_name}</div>
            {/volist}
          </div>
       {/if}
     </form>
     <div class="footer fixed_full text-center" id="fixBG">
        本次补发票未税金额合计：<strong class="colorRed"><span id="allweishui" class="num2 ObjectNum">0.00</span>元</strong>;税金合计：<strong class="colorRed"><span id="allshuijin" class="num2 ObjectNum">0.00</span>元</strong>;含税金额合计：<strong class="colorRed"><span id="allhanshui" class="num2 ObjectNum">0.00</span>元</strong>;实际金额合计：<strong class="colorRed"><span id="allhanshui2" class="num2 ObjectNum">0.00</span>元</strong>;
    </div>
    {if $main.state==7}
    <div class="applyImg font-bold">
        申报已生效
      </div>
      {/if}
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
      <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
              <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
                 <script src="__STATIC__/layout/js/common.js"></script>
                  <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
                  <script src="__STATIC__/layout/js/contabs_sub.js"></script>
   <script>
   function jisuan(){
      var weishui=0;var shuijin=0;var hanshui=0;
      $(".neirong").each(function(){
        
          weishui+=parseFloat($(this).children().eq(9).html().replace(',', ''));
          shuijin+=parseFloat($(this).children().eq(10).html().replace(',', ''));
          hanshui+=parseFloat($(this).children().eq(11).html().replace(',', ''));
        
      })
      $("#allweishui").html(weishui.toFixed(2));$("#allshuijin").html(shuijin.toFixed(2));$("#allhanshui").html(hanshui.toFixed(2));$("#allhanshui2").html(hanshui.toFixed(2));
         var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);
    }
    jisuan();
function down(id){
  window.open("{:url('download_fujian')}?fid="+id);
}
              //详情也
function xiangqing(aid){
     var index = layer.open({
                            type:2,
                            title:'AP申请详情',
                            area:['100%','100%'],
                            maxmin:true,
                            content:'{:url("Apapply/apply_de")}?aid='+aid
                        })
}
     function hede(hid,aid){
    
      var index = layer.open({
                            type:2,
                            title:'AP申请详细',
                            area:['100%','100%'],
                            maxmin:true,
                            content:"{:url('Apapply/apCostVerifyDetail')}?hid="+hid+"&aid="+aid
                        })
    }


    $(function(){
                $(".num2").each(function(){
        $(this).html(parseFloat($(this).html()).toFixed(2));
     })
         
         var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);
      
    })
   </script>
   
</body>

</html>
